﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CVSA.Master" AutoEventWireup="true" CodeBehind="ListaDemandasRemedy.aspx.cs" Inherits="CVSA.Suporte.Sinacor.BMFBovespa.ConsultaRemedy.ListaDemandasRemedy" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        body
        {
            font-family: Calibri;
            font-size: 11pt;
            border: solid 1px;
            margin: 0px;
        }
        .style1
        {
            vertical-align: top;
            width: 150px;
        }
        .tb
        {
            margin-left: 50px;
        }
        .style2
        {
            vertical-align: top;
            width: 500px;
        }
    </style>

    <script type="text/javascript" language="javascript">
        function showDetail(control) {
            if (control.style.display == 'none') {
                control.style.display = 'block';
            }
            else {
                control.style.display = 'none';
            }

        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p align="center" style="font-size: 15pt">
        <u>Pesquisa de Demandas</u>
    </p>
    <table class="tb">
        <tr>
            <td>
                <table>
                    <tr>
                        <td class="style1">
                            Informe o nome da corretora:
                        </td>
                        <td>
                            <asp:TextBox runat="server" ID="txtNomeCorretora" onkeyup="javascript:setTimeout('__doPostBack(\'ctl00$ContentPlaceHolder1$btnPesquisar\',\'\')', 500)"
                                Width="590px" />
                        </td>
                        <td>
                            N° Demanda:
                        </td>
                        <td>
                            <asp:TextBox runat="server" ID="txtIdIncidente" onkeyup="javascript:setTimeout('__doPostBack(\'ctl00$ContentPlaceHolder1$btnPesquisar\',\'\')', 500)"
                                Width="150px" />
                        </td>
                    </tr>
                </table>
                <asp:UpdateProgress ID="updProgress" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
                    <ProgressTemplate>
                        <span style="color: red">Carregando...</span>
                    </ProgressTemplate>
                </asp:UpdateProgress>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <p align="center" style="font-size: 15pt">
                            <u>Demandas Abertas :
                                <asp:Literal runat="server" ID="ltlQtdChamados" /></u></p>
                        <div style="display: none">
                            <asp:Button runat="server" ID="btnPesquisar" OnClick="btnPesquisar_Click" />
                        </div>
                        <asp:GridView runat="server" ID="gvChamadosRemedy" AutoGenerateColumns="false" OnRowDataBound="formatRow">
                            <Columns>
                                <asp:BoundField HeaderText="Id Incidente" DataField="IdIncidente" HeaderStyle-Width="120"
                                    ItemStyle-VerticalAlign="Top" />
                                <asp:BoundField HeaderText="Corretora" DataField="Empresa" HeaderStyle-Width="320"
                                    ItemStyle-VerticalAlign="Top" />
                                <asp:BoundField HeaderText="Data de Abertura" DataField="Data_Abertura" HeaderStyle-Width="120"
                                    ItemStyle-VerticalAlign="Top" />
                                <asp:BoundField HeaderText="Status" DataField="Status" HeaderStyle-Width="50" ItemStyle-VerticalAlign="Top" />
                                <asp:BoundField HeaderText="Área Designada" DataField="Area_Designada" HeaderStyle-Width="270"
                                    ItemStyle-VerticalAlign="Top" Visible = "false" />
                                <asp:TemplateField HeaderText="Detalhe" ItemStyle-VerticalAlign="Top" HeaderStyle-Width="300">
                                    <ItemTemplate>
                                        <div style="text-align: center">
                                            <a runat="server" id="showDetail" href="#">
                                                <img src="img/onenote.gif" border="0" alt="Clique aqui para visualizar a descrição do chamado." /></a></div>
                                        <div runat="server" id="div_txt" style="display: none">
                                            <%# FormatarTexto(Eval ("Detalhe").ToString()) %>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="#CCCCCC" BorderColor="Black" />
                            <RowStyle BorderColor="Black" />
                        </asp:GridView>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>
</asp:Content>

